package com.gk.javaservice.po;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.time.OffsetDateTime;

@Data
public class AtsPersonnel {

//    ObjectMapper mapper = new ObjectMapper();
//      AtsPersonnel user = mapper.readValue(jsonString, AtsPersonnel.class);
//    // 序列化成 JSON
//String json = mapper.writeValueAsString(user);

    private int id;
    private String codeurl;
    private String keyurl;

    @JsonProperty("Id")
    private String userId;

    @JsonProperty("CreateTime")
//    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX", timezone = "GMT+8")
    private String createTime;

    @JsonProperty("UserKey")
    private String userKey;

    @JsonProperty("Name")
    private String name;

    @JsonProperty("Picture")
    private String picture; // 可能是 URL 或 base64，此处用 String 表示

    @JsonProperty("DivisionId")
    private String divisionId;

    @JsonProperty("Division")
    private String division;

    @JsonProperty("DivisionCode")
    private String divisionCode;

    @JsonProperty("DepartmentId")
    private String departmentId;

    @JsonProperty("Department")
    private String department;

    @JsonProperty("DepartmentCode")
    private String departmentCode;

    @JsonProperty("SectionId")
    private String sectionId;

    @JsonProperty("Section")
    private String section;

    @JsonProperty("SectionCode")
    private String sectionCode;

    @JsonProperty("GroupId")
    private String groupId;
    @JsonProperty("GroupName")
    private String groupName;

    @JsonProperty("Group")
    private String group;

    @JsonProperty("GroupCode")
    private String groupCode;

    @JsonProperty("Title")
    private String title;

    @JsonProperty("Gender")
    private Integer gender; // 0: 未知, 1: 男, 2: 女

    @JsonProperty("Mobile")
    private String mobile;

    @JsonProperty("OfficeTel")
    private String officeTel;

    @JsonProperty("EmergencyContact")
    private String emergencyContact;

    @JsonProperty("EmergencyContactPhone")
    private String emergencyContactPhone;

    @JsonProperty("UserType")
    private Integer userType;

    @JsonProperty("Account")
    private String account;

    @JsonProperty("Mail")
    private String mail;

    @JsonProperty("ModifyTime")
//    @JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSXXX", timezone = "GMT+8")
    private String modifyTime;

    @JsonProperty("Memo")
    private String memo;

    @JsonProperty("Label")
    private String label;

    @JsonProperty("LinkMapId")
    private String linkMapId;

    @JsonProperty("IsDelete")
    private Boolean isDelete;

    @JsonProperty("BelongMapId")
    private String belongMapId;

    private String createdAt;
    private String        updatedAt;

}
